﻿namespace ArtheaEngine
{
    public abstract class Race
    {
        public abstract string Name { get; }

        public override string ToString()
        {
            return Name;
        }

        public static explicit operator Race(string x)
        {
            foreach (Race r in World.Races)
                if (r.Name == x)
                    return r;
            return new HumanRace();
        }
    }

    public abstract class PlayerRace : Race
    {
        public abstract string Description { get; }
    }

    public class HumanRace : PlayerRace
    {
        private const string description = "A generic race, good at just about everything.";
        private const string name = "Human";

        public override string Name
        {
            get { return name; }
        }

        public override string Description
        {
            get { return description; }
        }
    }

    public class DwarfRace : PlayerRace
    {
        private const string description = "Short, stocky race. Make good fighters or healers.";
        private const string name = "Dwarf";

        public override string Name
        {
            get { return name; }
        }

        public override string Description
        {
            get { return description; }
        }
    }

    public class ElfRace : PlayerRace
    {
        private const string description = "Magical creatures, good with magic or thievery.";
        private const string name = "Elf";

        public override string Name
        {
            get { return name; }
        }

        public override string Description
        {
            get { return description; }
        }
    }

    public class KoboldRace : Race
    {
        private const string name = "Kobold";

        public override string Name
        {
            get { return name; }
        }
    }
}